{% extends "director/index.html" %}
{% load static %}
{% load jsonify %}

{% block page_content %}
<script src='{% static "js/table.pack.js" %}'></script>
<script type="text/javascript">

//    row_filters={{row_filters | jsonify }}
//    placeholder = '{{placeholder |default:""}}'
//    row_sort={{row_sort | jsonify | default:'[]' }}
    heads={{ heads | jsonify | default:'[]'}}
    rows={{ rows | jsonify | default:'[]'}}
//    row_pages = {{ row_pages | jsonify}}
//    can_add={{can_add | jsonify| default:'false'}}
//    can_del={{can_del | jsonify| default:'false'}}
    search_args=ex.parseSearch()
    //	search字段从 search_args._q 来取值
    $(function () {
        table=new Vue({
            el:'#there',
            data:{
                heads:heads,
                rows:rows,
//                row_filters:row_filters,
//                row_sort:row_sort,
//                row_pages:row_pages,
//                placeholder:placeholder,
//                selected:[],
//                del_info:[],
                menu:menu,
//                can_add:can_add,
//                can_del:can_del,
//		        model:model,
//                search_args:search_args,
//                ex:ex,
            },
            mixins:[table_fun],
            watch:{
                'row_sort.sort_str':function (v) {
                    this.search_args._sort=v
                    this.search()
                }
            },
            methods:{
                rt_win:function(row){
                    ln.rtWin(row)
                },
                cancel:function(){
                    history.back()
                },
                map:function(name,row){
                    return row[name]
                }


            },

        })
    })

</script>
<div id='there'>
    <div class="btn-group" style='float: right;'>
        <button type="button" class="btn btn-default" @click='cancel()' >Cancel</button>
    </div>

    <com-table  class='table fake-suit' :has_check="false" :map="map"  :heads="heads" :rows="rows" ></com-table>




</div>
<style type="text/css" media="screen" id="test">
    /*.button-group{*/
    /*position: relative;*/
    /*display: inline-block;*/
    /*}*/
    .form-control{
        display: inline-block;
        margin-left:10px;
        width:auto;
        /*height:30px;*/
    }
    .sort-mark{
        float: right;
    }
    .selected{
        background-color: #DDD;
    }
    .clickable{
        cursor: pointer;
        font-size:120%;
        color: #0099CC;
    }
    /*.table tbody tr:nth-child(2n+1){*/
    /*background-color: #F5F5F5;*/
    /*}*/
    /*.table tbody tr:nth-child(2n){*/
    /*background-color: #F1F1F1;*/
    /*}*/

</style>
{% block extra %}
{% endblock %}
{% endblock %}